$('document').ready(function(){	
	$( 'textarea#clubdescription' ).ckeditor();    
	$('#frmEdit').validate({
            errorClass      : 'error',
            errorElement	: 'span',
    		onfocusout		: false,
    		onkeyup			: false,
    		ignore			: 'input[type="text"]:hidden',
			rules:{
				clubname:{
					required:true,
					minlength:VL_NAME_MINLENGTH,
					maxlength:VL_NAME_MAXLENGTH
				},
				clubnickname:{
					required: true,
					minlength:VL_NAME_MINLENGTH,
					maxlength:VL_NAME_MAXLENGTH
				},
				clubcountry:{
					required:true,
					minlength:2,
					maxlength:2
				},                 
                clubshort:{
                    required: true,
                    minlength: VL_SHORT_MINLENGTH,
                    maxlength: VL_SHORT_MAXLENGTH
                },
                clubdescription:{
                    required:true,
                    minlength:VL_CONTENT_MINLENGTH
                },
				
			},
			messages:{
				clubname:{
                    required : name_required,
                    minlength: name_minlength,
                    maxlength: name_maxlength
                },
				clubnickname:{
                    required : nickname_required,
                    minlength: nickname_minlength,
                    maxlength: nickname_maxlength
                },
				clubcountry:{
                    required : country_required,
                    minlength: country_minlength,
                    maxlength: country_maxlength                
                },
                clubshort:{
                    required  : short_required,
                    minlength: short_minlength,
                    maxlength: short_maxlength
                },
                clubdescription:{
                    required:description_required,
                    minlength:description_minlength
                }
			},
			errorPlacement: function(error, element) {
			       error.insertAfter(element); // change this to place error message elsewhere
			}			
	});
});
